<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>景旭分销在线（JXDOL.COM）——专业商家采购平台</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta content="zh-cn" http-equiv="content-language" />
<meta content="" name="copyright" />

<%@ include file="/page/pc/include.jsp"%>

<script type="text/javascript" src="<%=basePath %>/statics/js/jquery.SuperSlide.2.1.1.js"></script>
<script type="text/javascript" src="<%=basePath %>/statics/js/custom.js"></script>

<!--[if lte IE 6]> 
<script type="text/javascript" src="js/PNG.js"></script> 
<script> 
PNG.fix('*'); 
</script> 
<![endif]-->
<style>
.box5_con .pic {
	padding-top: 8px;
}

.box5_con .item-info h2 {
	height: 40px;
	overflow: hidden
}

.xz_part  ul li {
	float: left;
	width: 33.3%;
	height: 20px;
	margin-bottom: 5px
}

.c_box .c_left .bottom {
	display: inline-block;
	width: 100%;
	margin-top: 10px;
}

.c_box .c_left .bottom p .inputbtn1 {
	display: inline-block;
	line-height: 28px;
	height: 28px;
	width: 70px;
	border-radius: 2px;
	border: 1px solid #E74649;
	text-align: center;
	font-size: 13px;
	text-decoration: none;
	cursor: pointer;
	border: 0;
	outline: none;
	color: #FFF;
	background-color: #E74649;
}

.c_box .c_left .bottom p .inputbtn1:hover {
	opacity: 0.8
}

.xz_part  ul li input {
	display: none
}

.xz_part  ul li label i {
	display: inline-block;
	margin-right: 6px;
	width: 10px;
	height: 10px;
	border: 1px solid #cccccc;
	display: inline-block;
	vertical-align: middle;
	background: #fff;
}

.xz_part  ul li label.checked i {
	border-color: #e4393c;
	background: url('<%=basePath %>/statics/images/search.ele.png') no-repeat 9999px 9999px;
	background-position: -1px -108px;
}

.xz_part  ul li label span {
	display: inline-block;
	vertical-align: middle;
}

.xz_part  ul li label.checked span {
	color: #e4393c
}
</style>
<script type="text/javascript">

	$(function() {
		$('a.backtop').click(function() {
			$('body,html').animate({
				scrollTop : 0
			}, 1000);
		});
		//侧边菜单
		$(window).scroll(function() {
			$scrollTo = $(window).scrollTop();

			if ($scrollTo > 100) {
				$('#fixedfloor').show().addClass('fixedfloor');
			} else {
				$('#fixedfloor').hide();
			}
		}).trigger('scroll');
		
		//点击楼层图标跳转到对应的楼层
		$('#fixedfloor ul li a').click(function() {
			$.dot_not_scoll = true;
			$idx = $(this).parents('#fixedfloor').find('a').index($(this));
			$target = $('.hd').find('b').eq($idx);
			$top = parseInt($target.offset().top);

			$('body,html').animate({
				scrollTop : $top
			}, 1000);
			$.dot_not_scoll = undefined;
		});
		
		// 关键字查询
		$("#search_key").keydown(function(event){
			if(event.keyCode==13){
				var search_key = $("#search_key").val();
				if(search_key && search_key != null && search_key != ""){
					$("#product_search_form").submit();
				}
			} 
		});
	});

	$('#fixedfloor li').hover(function() {
		$(this).addClass('current');
	}, function() {
		$(this).removeClass('current');
	});

	//显示当前可看到的最小楼层对应的侧边菜单文字
	$(window).bind("scroll",function(event) {
		var s = undefined;
		$('.hd h3 b').each(function() {
			var thisTop = parseInt($(window).scrollTop()); //屏幕顶部距离最顶部的高度
			var thisButtomTop = parseInt($(window).height()) + thisTop;
			var currTop = parseInt($(this).offset().top);
			if (currTop >= thisTop && currTop <= thisButtomTop && $.dot_not_scoll == undefined) {
				$idx = $('.hd h3 b').index($(this));
				if (s == undefined) {
					s = true;
					$('#fixedfloor li').removeClass('current');
					$('#fixedfloor').find('li').eq($idx).addClass('current');
				}
			}
		});
	});
</script>

</head>
<body>
	<jsp:include page="../../browser_check.jsp" />
	<div class="wrap">
		<!---头部公共部分开始-->
		<div class="header">
			
			<jsp:include page="../header_top.jsp" />
			<input id="newCouponGetNum" type="hidden" value="${newCouponGetNum }"/>
			<div class="index_header">
				<div class="index_header_con">
					<h1>
						<a href="${rootPath}/pc/index"> <img src="${rootPath}/statics/images/logo.png" style="width:228px;height:49px;" />
						</a>
					</h1>
					<div class="search_part">
						<form id="product_search_form" action="${rootPath}/pc/product/search" method="post">
							<div class="search_part1">
								<div class="input_txt">
									<input type="text" id="search_key" name="searchKey" class="inputstyle" placeholder="" value="${searchKey}"/>
								</div>
								<input type="submit" class="inputbtn" value="搜 索" />
							</div>
						</form>
						<div class="search_part2">
							<p>
								<span id="hot_search_key_name">热门搜索：</span> 
							</p>
						</div>
					</div>
					<div class="cart_num">
						<p>
							<a href="${rootPath}/pc/shoppingcart/list" target="_blank"><i></i><span>我的购物车</span><em id="shopCount">0</em></a>
						</p>
					</div>
				</div>
			</div>
			<div class="index_nav">
				<div class="index_nav_con">
					<div id="category" class="category">
						<div class="category-bg"></div>
						<h2>
							<a href="#"> 企业商品分类 </a>
						</h2>
						<div class="cate-list" style="display: block">
							<ul id="J_category" load="1">
								<%--循环商品类型开始 --%>
								<%-- <li onmouseover="this.className='hover'" onmouseout="this.className=''">
									<div class="cate-item">
										<h3>
											<a href="${rootPath}/pc/product/search" target="_blank">
												<i>
													<img src="${rootPath}/statics/images/all_product.png" style="width:20px;height:20px;" />
												</i>
												<span>全部商品</span>
												<em>&gt;</em>
											</a>
										</h3>
									</div>
								</li> --%>
								<c:forEach items="${categoryList}" var="category">
									<li onmouseover="this.className='hover'" onmouseout="this.className=''">
										<div class="cate-item">
											<h3>
												<a href="#">
													<i>
														<img src="${imgRootURL }${category.categoryImage }?x-oss-process=image/resize,m_pad,h_20,w_20" onerror="this.src='${rootPath}/statics/images/left_icon1.png'"/>
													</i>
													<span>${category.categoryName}</span>
													<em>&gt;</em>
												</a>
											</h3>
										</div>
										<div class="cate-list-expand categoryDiv_${category.id}">
											<div class="c_box">
												<div class="c_left">
													<%-- 品牌 begin --%>
													<c:if test="${not empty category.subBrandList }">
														<dl>
															<dt>品牌</dt>
															<dd>
																<div class="xz_part brand_ul">
																	<ul class="brand_ul_${category.id}">
																		<c:forEach items="${category.subBrandList}" var="brand">
																			<li id="brandLi_${category.id}_${brand.id}" onclick="javascript: doLiLabel('brandLi_${category.id}_${brand.id}'); reloadCategory('${category.id}');">
																				<input type="checkbox" class="temp_brand_${category.id}" value="${brand.id}" />
																				<label id="${category.id}" title="${brand.id}">
																					<i></i>
																					<span>${brand.brandNameCh}</span>
																				</label>
																			</li>
																		</c:forEach>
																	</ul>
																</div>
															</dd>
														</dl>
													</c:if>
													<%-- 品牌 end --%>
													<dl>
														<dt>
															<a href="${rootPath}/pc/product/search?categoryId=${category.id}" target="_blank">${category.categoryName}</a>
														</dt>
														<c:if test="${not empty category.subCategoryList }">
															<dd>
																<div class="xz_part category_ul">
																	<ul class="temp_ul_${category.id}">
																		<c:forEach items="${category.subCategoryList}" var="subCategory">
																			<li id="categoryLi_${category.id}_${subCategory.id}" onclick="javascript: doLiLabel('categoryLi_${category.id}_${subCategory.id}');">
																				<input type="checkbox" value="${subCategory.id}" />
																				<label id="${category.id}" title="${subCategory.id}">
																					<i></i>
																					<span>${subCategory.categoryName}</span>
																				</label>
																			</li>
																		</c:forEach>
																	</ul>
																</div>
																<div class="bottom">
																	<p>
																		<input type="button" id="btnBrandCategorySearch_${category.id}" onclick="javascript: doProductSearch('${category.id}');" class="inputbtn1" style="background-color:gray;" value="搜索" />
																	</p>
																</div>
															</dd>
														</c:if>
													</dl>
												</div>
												<div class="c_right">
													<a href="${category.advertisementUrl }">
														<img src="${imgRootURL }${category.advertisementImage }"onerror="this.src='${rootPath}/statics/images/ed4.jpg'" />
													</a>
												</div>
											</div>
										</div>
									</li>
								</c:forEach>
								<%--循环商品类型结束 --%>
							</ul>
						</div>
					</div>
					<div class="site_nav">
						<ul>
							<li><a href="${rootPath}/pc/index">首页</a></li>
							<li><a href="${rootPath}/pc/my/quotation">报价单</a></li>
							<li><a href="${rootPath}/pc/product/search">全部商品</a></li>
							<li><a href="${rootPath}/pc/index#tag_5">新品上市</a></li>
							<li><a href="${rootPath}/pc/index#tag_4">热品采购</a></li>
							<%-- <li><a href="${rootPath}/pc/index#tag_6">品牌馆</a></li> --%>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<!---头部公共部分结束-->
		
		<div class="site_wrap1">
			<div id="slideBox" class="slideBox">
				<div class="hd">
					<ul id="slide_no">
						<li>1</li>
						<li>2</li>
						<li>3</li>
					</ul>
				</div>
				<div class="bd">
					<ul id="slide_content">
						<li style="background: url(${rootPath}/statics/images/banner8.jpg) no-repeat top center"></li>
						<li style="background: url(${rootPath}/statics/images/banner8.jpg) no-repeat top center"></li>
						<li style="background: url(${rootPath}/statics/images/banner8.jpg) no-repeat top center"></li>
					</ul>
				</div>
			</div>
			<script type="text/javascript">
				jQuery("#slideBox").slide({mainCell:".bd ul",autoPlay:true});
			</script>


			<div class="site_wrap1_con">
				<div class="grzh">
					<div class="hd">
						<h3>个人账户</h3>
					</div>
					<div class="bd">
						<div class="grzh_con">
							<div class="grzh_info1">
								<div class="pic">
									<img  src="${imgRootURL }${user.path}" onerror="this.src='${rootPath}/statics/images/user_img.png'"  />
								</div>
								<div class="item-info">
									<h2>Hi,~ 欢迎来到景旭商城</h2>
									<p>
										<shiro:guest>
										<a href="<%=basePath %>/home/loginPage">登录</a><a href="<%=basePath %>/reg/toRegPage">注册</a>
										</shiro:guest>
										<shiro:user>
										[<shiro:principal property="userName"/>]
										</shiro:user>
									</p>
								</div>
							</div>
							<div class="fh_nav">
								<ul>
									<li><a href="javascript: toMyOrderStatus('01');"><em id="to_pay_num">0</em> <span>待付款</span></a></li>
									<li><a href="javascript: toMyOrderStatus('04');"><em id="to_send_num">0</em> <span>待发货</span></a></li>
									<li><a href="javascript: toMyOrderStatus('05');"><em id="to_receive_num">0</em> <span>待收货</span></a></li>
									<li><a href="<%=basePath %>/pc/order/list?isOver=1&payStatus=01"><em id="overdued_num">0</em> <span>已逾期</span></a></li>
								</ul>
							</div>
							<div class="dhfk_part">
								<ul>
									<li>
										<div class="box1">
											<h2>
												<img src="${rootPath}/statics/images/icon_dh.png" /><span>订货</span>
											</h2>
											<dl>
												<dt>
													本周：<b id="cur_week_num">¥0.00</b>
												</dt>
												<dt>
													本月：<b id="cur_month_num">¥0.00</b>
												</dt>
											</dl>
										</div> 
									</li>
								</ul>
							</div>
							<div class="qytq_part">
								<div class="qytq_part_con">
									<div class="hd1">
										<h3>
											<img src="${rootPath}/statics/images/icon_qytq.png" /><span>企业特权</span>
										</h3>
									</div>
									<div class="bd1">
										<ul>
											<li>
												<div class="box2">
													<div class="pic">
														<img src="${rootPath}/statics/images/icon_cght.png" />
													</div>
													<div class="item-info">
														<h2>采购合同</h2>
														<p>专用合同 · 提供保障</p>
													</div>
												</div>
											</li>
											<li>
												<div class="box2">
													<div class="pic">
														<img src="${rootPath}/statics/images/icon_zzkp.png" />
													</div>
													<div class="item-info">
														<h2>自主开票</h2>
														<p>货票分离 · 自主开票</p>
													</div>
												</div>
											</li>
											<li>
												<div class="box2">
													<div class="pic">
														<img src="${rootPath}/statics/images/icon_bjzf.png" />
													</div>
													<div class="item-info">
														<h2>便捷支付</h2>
														<p>对公转账 · 款票统一</p>
													</div>
												</div>
											</li>
											<li>
												<div class="box2">
													<div class="pic">
														<img src="${rootPath}/statics/images/icon_zysh.png" />
													</div>
													<div class="item-info">
														<h2>专业售后</h2>
														<p>超长时效 · 售后无忧</p>
													</div>
												</div>
											</li>
										</ul>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="site_wrap2">
			<div class="site_wrap2_con">
				<c:forEach items="${entryList}" var="entry" varStatus="ind">
					<div class="${ind.index == 0 ? 'leftitem' : 'rightitem' }">
						<a href="${entry.linkUrl }">
							<div class="box3">
								<img src="${imgRootURL}${entry.imagePath}" /> <strong> <span>立即进入</span><i></i>
								</strong>
							</div>
						</a>
					</div>
				</c:forEach>
			</div>
		</div>

		<div class="site_wrap3">
			<div class="site_wrap3_con">
				<%-- 楼层 --%>			
				<c:forEach items="${floorList}" var="floor">
					<div class="hd">
						<a name="tag_${floor.siteModule.id}"></a>
						<h3>
							<i></i><strong><b>${floor.siteModule.moduleName}</b><em>${floor.siteModule.intro}</em></strong>
						</h3>
					</div>
					<div class="bd">
						<div class="list1">
							<ul>
								<%--广告位 --%>
								<c:forEach items="${floor.configItemList}" var="config" varStatus="ind">
									<c:if test="${ind.index == 0 }">
									<li>
										<a href="${config.linkUrl}">
											<div class="box4">
												<img src="${imgRootURL}${config.imagePath}" />
												<!-- <strong><span>立即进入</span><em>&gt;</em></strong> -->
											</div>
										</a>
									</li>
									</c:if>
								</c:forEach>
								<%--商品 --%>
								<c:forEach items="${floor.configItemList}" var="config" varStatus="ind">
									<c:if test="${ind.index != 0 }">
									<li>
										<div class="box5">
											<div class="box5_con">
												<div class="pic"> 
													<a href="${rootPath}/pc/product/detail?productId=${config.productCode}"  target="_blank"><img src="${imgRootURL}${config.imagePath}" /></a>
												</div>
												<div class="item-info">
													<h2>
														<a href="${rootPath}/pc/product/detail?productId=${config.productCode}"  target="_blank">${config.productName }</a>
													</h2>
													<h3>
														<shiro:guest>
															参考价
														</shiro:guest>
														<shiro:authenticated>
															企业价
														</shiro:authenticated>
														<b id="dyna_price_${config.productCode}">￥</b>
													</h3>
													<p>
														<shiro:guest>
														<a href="<%=basePath %>/home/loginPage" >登录查看企业专享价</a>
														</shiro:guest>
													</p>
												</div>
											</div>
										</div>
									</li>
									</c:if>
								</c:forEach>
							</ul>
							
							<div class="more" style="margin-top: -10px;">
								<p>
									<a style="font-size:14px;" href="${rootPath}/pc/product/search">更多&gt;&gt;</a>
								</p>
							</div>
						</div>
					</div>
				
				</c:forEach>

								
				<div class="hd">
					<a name="tag_6"></a>
					<h3>
						<i class="a3"></i><strong><b>品牌馆</b><em>BRAND</em></strong>
					</h3>
				</div>
				<div class="bd1">
					<div class="brand_part">
						
						<div class="left_part">
							<c:forEach items="${brandList }" var="brand" varStatus="ind">
							<c:if test="${ind.index == 0 }">
							<a href="${brand.linkUrl}">
								<div class="box7">
									<img src="${imgRootURL}/${brand.imagePath}" /> <strong><span><c:if test="${empty brand.secondTitle}">立即进入</c:if><c:if test="${not empty brand.secondTitle}">${brand.secondTitle}</c:if></span><i>&gt;</i></strong>
								</div>
							</a>
							</c:if>
							</c:forEach>
						</div>
						<div class="right_part">
							<div class="brand_list">
								<ul>
									<c:forEach items="${brandList }" var="brand" varStatus="ind">
										<c:if test="${ind.index != 0 }">
										<li>
											<div class="box8">
												<div class="pic">
													<img src="${imgRootURL}/${brand.imagePath}" />
												</div>
												<div class="item-info">
													<div class="item-info_con">
														<h2>${brand.configTitle}</h2>
														<h3>稳健商务伙伴</h3>
														<p>
															<a href="${brand.linkUrl}"  target="_blank">立即查看</a>
														</p>
													</div>
												</div>
											</div>
										</li>
										</c:if>
									</c:forEach>
								</ul>
							</div>
						</div>
						<div class="more">
							<p>
								<a href="商品列表.htm">更多&gt;&gt;</a>
							</p>
						</div>
					</div>
				</div>
				
			</div>
		</div>
		<!---网站底部开始-->
		<jsp:include page="../footer.jsp?showQaFlag=1" flush="true" />
		<!---网站底部结束-->
	</div>
	
	<script charset="utf-8" language="javascript" type="text/javascript" src="<%=basePath%>/statics/js/nav.js"></script>
	

	<!---左侧楼层导航开始-->
	<div class="notfixed" id="fixedfloor">
		<div class="leftbar">
			<ul>
				<li><a href="javascript:void(0)"> <span>热品<br/>采购</span>
				</a></li>
				<li><a href="javascript:void(0)"> <span>新品<br/>上市</span>
				</a></li>
				<li><a href="javascript:void(0)"> <span>品牌<br/>馆</span>
				</a></li>
				<li><a href="javascript:void(0)"> <span>常见<br/>问题</span>
				</a></li>
			</ul>
			<a href="javascript:void(0)" class="backtop"><img src="${rootPath}/statics/images/icon_backtop1.png" /></a>
		</div>
	</div>
	<!---左侧楼层导航结束-->
	<script type="text/javascript" src="<%=basePath %>/js/home/index.js?v=201800202"></script>
<script type="text/javascript">
	$(function() {
	
		//判断是否有新增优惠券
		var newCouponGetNum = $("#newCouponGetNum").val();
		if (newCouponGetNum > 0) {
			layer.open({
				  type: 1
				  ,offset: 'rb' //具体配置参考：offset参数项
				  ,content: '<div style="padding: 20px 80px;">您有'+newCouponGetNum+'张优惠券已到账</div>'
				  ,btn: '查看'
				  ,btnAlign: 'c' //按钮居中
				  ,shade: 0 //不显示遮罩
				  ,yes: function(){
				    window.location.href = rootPath + "/pc/my/couponGet";
				  }
				});
		}
		
		/*
		$('.category_ul li label').click(function() {
			var categoryId = $(this).attr('id');
			if ($(this).hasClass('checked')) {
				//$(this).parent().find('input').removeAttr('checked');
				// $(this).parent().find('input').removeClass('checked');
				$(this).removeClass('checked');
			} else {
				//$(this).parent().find('input').attr('checked', 'checked');
				// $(this).parent().find('input').addClass('checked');
				$(this).addClass('checked');
			}
			reloadBtn(categoryId);
			
		});
		$('.brand_ul li label').click(function() {
			var categoryId = $(this).attr('id');
			if ($(this).hasClass('checked')) {
				$(this).removeClass('checked');
			} else {
				$(this).addClass('checked');
			}
			reloadBtn(categoryId);
		});
		*/
		/* $('.xz_part ul li label').click(function() {
			debugger;
			if ($(this).hasClass('checked')) {
				$(this).parent().find('input').removeAttr('checked');
				$(this).removeClass('checked');
			} else {
				$(this).parent().find('input').attr('checked', 'checked');
				$(this).addClass('checked');
			}
		}); */
	});
</script>
</body>
</html>